﻿"use strict";

angular.module('ecApp').config(['$routeProvider', function ($routeProvider) {

    var routes = [
        {
            url: '/dashboard',
            config: {
                template: '<ec-app-dashboard></ec-app-dashboard>'
            }
        },
        {
            url: '/starter',
            config: {
                templateUrl: '/app/components/starter/starterTemplate.html'
            }
        },
        {
            url: '/entities',
            config: {
                templateUrl: '/app/components/entities/entitiesTemplate.html'
            }
        },
        {
            url: '/configuration',
            config: {
                templateUrl: '/app/components/configuration/configurationTemplate.html'
            }
        },
        {
            url: '/userRoles',
            config: {
                templateUrl: '/app/components/userRoles/userRolesTemplate.html'
            }
        },
        {
            url: '/authentication',
            config: {
                templateUrl: '/app/components/authentication/authenticationTemplate.html'
            }
        },
        {
            url: '/externalReferences',
            config: {
                templateUrl: '/app/components/externalReferences/externalReferencesTemplate.html'
            }
        }
    ];

    routes.forEach(function (route) {
        $routeProvider.when(route.url, route.config);
    });

    //$routeProvider.otherwise({ redirectTo: '/dashboard' });
    $routeProvider.otherwise('/dashboard');
}]);